<?php
session_start();
error_reporting(0)?>
<table border="1" width="600px" align="center">
	<tr>
		<td colspan="4">
			<?php
			if($_SESSION['data']){
			?>
			用户：<?php echo $session['name']?>
			余额：<?php echo $session['balance']?>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo site_url('goods/balance')?>">消费记录</a><br>
			状态：<?php  if($session['status']==0){echo "还不是分销商";}else{echo "已经为分销商";}?><br />
			<?php if(!empty($session['qrcode'])){?>
			邀请你的好朋友扫描这个：<a href="<?=$session['qrcode']?>" target="_blank">二维码</a>
			<?php }?>
			<?php }else{?>
			未登录<a href="<?php echo site_url('welcome/index')?>">请登录</a>
			<?php }?>
		</td>
	</tr>
	<tr>
		<td>商品序号</td>
		<td>商品名称</td>
		<td>商品价格</td>
		<td>操作</td>
	</tr>
	<?php
	foreach ($data as $v){
	?>
	<tr>
		<td><?php echo $v['id']?></td>
		<td><?php echo $v['name']?></td>
		<td><?php echo $v['price']?></td>
		<td><a href="<?php echo site_url('welcome/shop?id='.$v['id'])?>">购买</a></td>
	</tr>
	<?php }?>
</table>
